package com.htgd.gardenexpo.dao;

import com.htgd.gardenexpo.entity.GeConTheaterPlanMovie;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 计划和影片关系 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-09-09
 */
public interface GeConTheaterPlanMovieMapper extends BaseMapper<GeConTheaterPlanMovie> {

    @Select("SELECT * FROM `ge_con_theater_plan_movie` WHERE plan_id = #{planId} ORDER BY tickets DESC LIMIT 1")
    GeConTheaterPlanMovie getMax(@Param("planId") String planId);
}
